<template>
  <h2>当前求和为：{{ sum }}</h2>
  <button @click="sum++">点我+1</button>
  <hr>
  <h2>当前点击时鼠标的坐标为：x:{{point.x}}, y:{{point.y}}</h2>

</template>

<script>
import {ref} from 'vue'
import usePoint from "@/hooks/usePoint";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Demo',
  setup: function () {
    let sum = ref(0)
    let point = usePoint()


    // onBeforeUpdate(()=>{
    //   console.log('----onBeforeUpdate----')
    // })
    // onUpdated(()=>{
    //   console.log('----onUpdated----')
    // })
    //
    // onUnmounted(()=>{console.log('----onUnmounted----')})

    return {
      sum,point
    }
  },


}
</script>


